PDA

View Full Version : .xinitrc and .xsession is not working ubuntu 12.10



wind_clouds
June 6th, 2013, 04:42 PM
Hi Everybody,

I am using Ubuntu 12.10 and using gdm autologin for user1. After autologin i need to run gnome-terminal should call from .xsession.

I have created .xinitrc and link with .xsession and i've included "gnome-terminal &" even it is not working.


su - user1

vi .xinitrc
#!/usr/bin/env bash
gnome-terminal &

:wq

chmod +x .xinitrc

ln -s ~/.xinitrc ~/.xsession

cat .xsession
#!/usr/bin/env bash
gnome-terminal &

ls -l .xinitrc .xsession
-rwxr-xr-x 1 user1 user1 409 Jun 5 20:04 .xinitrc
lrwxrwxrwx 1 user1 user1 25 Jun 5 20:36 .xsession -> /home/user1/.xinitrc

please suggest me how to do it

ohnonot
June 7th, 2013, 09:44 AM
i don't think this will work with a current ubuntu install.
kindly undo all the xinit stuff.
then, type 'startup' in dash, go to startup... (i forget the exact name) and add a new entry. just put 'gnome-terminal' in there, and it should come up after login

wind_clouds
June 7th, 2013, 02:32 PM
The same setting has been configured in TOSHIBA laptop it works good.

But this desktop (dell) is not taking the .xsession. what could be the problem with desktop system. how to find solution for this.

In the startup we can add that gnome-terminal but how to remove the panels.

The .xsession will remove all things only it displays desktop screen. In that .xsession i can include gnome-terminal & and when i restart the system it will display only gnome-terminal on the desktop screen and nothing will display.

i need this setup.........

ohnonot
June 7th, 2013, 09:25 PM
...then ubuntu with unity isn't the right choice.
this kind of stuff (or what i understood of it - i have never seen your TOSHIBA laptop and what sytem it runs) does not work with such a complex desktop environment.
maybe you should even choose a different distro.

rileyrg2
January 14th, 2014, 11:17 PM
...then ubuntu with unity isn't the right choice.
this kind of stuff (or what i understood of it - i have never seen your TOSHIBA laptop and what sytem it runs) does not work with such a complex desktop environment.
maybe you should even choose a different distro.

There are changes to the way the graphical desktops source the init files but to blanket state it "does not work in such a complex desktop environment" is nonsense. To even mention the make of the HW even more so. The execution or sourcing of init files is controlled by /etc/X11 type configs and also depends on stuff like login shells, interactive shells and non interactive shells. For Debian with gdm3, for example, see here : http://www.debian.org/doc/manuals/debian-reference/ch07.en.html#_starting_x_session_with_gdm3 .

Thomas_Cremers
February 15th, 2014, 08:12 PM
The answer to this is really simple. Ubuntu uses lightdm and you need to create a desktop entry for a default Xsession which in turn will read out your ~/.xsession file. If you already made a .xinitrc file just symlink it and don't forget to set the execute bit (chmod +x ~/.xsession)

Create the following file in /usr/share/xsessions/custom.desktop with:


[Desktop Entry]
Name=Xsession
Exec=/etc/X11/Xsession

Logout and select the correct session and you're done. That's how I run the Awesome window manager with some gnome support.

Good luck